<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDemandsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //需求
        Schema::create('demands', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment();
            $table->string('title')->nullable()->comment('标题');
            $table->text('content')->nullable()->comment('需求描述');
            $table->integer('recruitment')->default(0)->comment('招聘人数');
            $table->string('salary')->nullable()->comment('薪资');
            $table->string('education')->nullable()->comment('学历');
            $table->string('position')->nullable()->comment('职位');
            $table->timestamp('first_arrive_time')->nullable()->comment('最早到岗时间');
            $table->timestamp('last_arrive_time')->nullable()->comment('最晚到岗时间');
            $table->timestamp('start_time')->nullable()->comment('招聘开始时间');
            $table->timestamp('end_time')->nullable()->comment('招聘结束时间');
            $table->integer('classify_id')->default(0)->comment('分类id');
            $table->string('province',64)->nullable()->comment('省份');
            $table->string('city',64)->nullable()->comment('城市');
            $table->string('area',64)->nullable()->comment('地区');
            $table->string('address')->nullable()->comment('详细地址');
            $table->integer('review')->default(0)->comment('审核 0：待处理 1：通过 2：拒绝');
            $table->integer('is_shop')->default(0)->comment('展示状态 0：下架 1：上架');
            $table->integer('is_recommend')->default(0)->comment('是否推荐 0：不推荐 1：推荐');
            $table->integer('status')->default(0)->comment('状态 0：筛选中 1：成功对接');
            $table->integer('industry_id')->default(0)->comment('行业id');
            $table->integer('browse_num')->default(0)->comment('浏览量');
            $table->integer('attention_num')->default(0)->comment('关注数量');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
